package org.grow.swimming.exception;

import java.util.StringJoiner;

/**
 * @Author: xwg
 * @CreateDate: 2022/5/8
 */


public class StateException extends RuntimeException{
    private Integer code;

    public StateException(String message) {
        super(message);
        this.code = 888;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", NoticeException.class.getSimpleName() + "[", "]")
                .add("code=" + code)
                .add("message=" + getMessage())
                .toString();
    }
}
